<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap{
	/*
	 protected function _initView(){
	 // Initialize view
	 $view = new Zend_View();
	 $viewa = new Zend_Controller_Action_Helper_ViewRenderer($view);
	 $viewa->setViewSuffix('tpl');
	 Zend_Controller_Action_HelperBroker::addHelper($viewa);
	 $view->doctype('XHTML1_STRICT');
	 $view->headTitle('My First Zend Framework Application');
	 $view->setScriptPath(APPVIEW_PATH . '/mf/admin/');       // Add it to the ViewRenderer
	 $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
	 $viewRenderer->setView($view);        // Return it, so that it can be stored by the bootstrap
	 return $view;
	 }
	 */

	protected function _initView(){
		// Initialize Smarty view
		$application = Zend_Registry::get('application');
		$templates_dir = $application['resources']['view']['smarty']['templates_dir'];
		$smartySetup = $application['resources']['view']['smarty'];
		Zend_Controller_Action_HelperBroker::addHelper(new Mf_Controller_Action_Helper_View($templates_dir,$smartySetup));
		//  return $smarty;
	}
	
	protected function _initDb(){
	 $_db = $this->getPluginResource('db');
	 $dbarray = $_db->getParams();
	 $db = $_db->getDbAdapter();
	 $db->query($dbarray['driver_options'][1002]);
	 Zend_Registry::set('db',$db);
	  //return $db;
	}
	
	 
}